﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ObserverSample
{
    class Player : IObserver
    {
        public string Name { get ; set; }

        public Player(string name)
        {
            Name = name;
        }

        public void BeAttacked(AllyConrolCenter allyConrolCenter)
        {
            Console.WriteLine("队友正在受到攻击");
            allyConrolCenter.NoteifyOBsever(this.Name);
        }

        public void Help()
        {
            Console.WriteLine($"坚持住，{this.Name}来救你");
        }
    }
}
